package com.dao;
import com.entity.AsRolePremission;
import org.apache.ibatis.annotations.Param;

public interface AsRolePremissionDao
{
    //根据roleId和functionId查询是否存在授权 存在则返回主键id
    public AsRolePremission selectByRoleIdAndFunctionId(
            @Param( "roleId" ) Integer roleId ,
            @Param( "functionId" ) Integer functionId );

    //向表中写入一条角色权限
    public Integer addOneRolePremission( AsRolePremission arp );

    //更新表中一条角色权限
    public Integer updateOneRolePremission( AsRolePremission arp );

    //删除表中一条角色权限
    public Integer delOneRolePremission( AsRolePremission arp );

    //停用一条角色授权
    public Integer cancelOneRolePremission(
            @Param( value = "roleId" ) Integer roleId ,
            @Param( value = "functionId" ) Integer functionId );

    //保值主键操作后仍连续自增
    public Integer keepPrimaryContinue( Integer id );
}
